﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="banner.aspx.cs" Inherits="ZF.WS.news.banner" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body style="margin: 0px; padding: 0px">
    <form id="form1" runat="server">

    <script src="/js/jQuery.js" type="text/javascript"></script>

    <script src="/js/jqPlugins/jquery.cycle.js" type="text/javascript"></script>

    <style type="text/css">
        #banner { width: 280px; margin: 0px auto; height: 237px; overflow: hidden; z-index: -1; }
        #banner a img{ border:0px}
        #btn { display: inline; width: 110px; hegiht: 18px; float: left; margin: -42px 0px 0px 185px; position: absolute; z-index: 32; }
        #btn a {   color: #fff; font-size: 10px; ;background:#323232;border:1pxsolid#323232;float:left;width:12px;height:12px;line-height:12px;text-align:center;text-decoration:none;margin-left:5px;}
        #btn a.activeSlide { color: #fff; background: #CC0000; border: 1px solid #CC0000; }
        #btn a:hover { color: #fff; border: 1px solid #eee; background: #323232; }
        #hot_title { font-size: 12px; color: #fff; margin-left: 0px; position: absolute; z-index: 3; top: 0px; width: 280px; height: 30px;  vertical-align:bottom  }
        #hot_title a{ color:#fff; display:block; width: 280px; height: 237px;  line-height: 237px; vertical-align:bottom; padding-top:106px;}
        #hot_title a:hover{ color:#f00;}
        .hot_title { font-size: 12px; color: #fff; margin-left: 0px; position: absolute; z-index: 2; top: 210px; width: 280px; height: 30px; line-height: 30px; overflow: hidden; background: #000; filter: alpha(opacity=50); }
    </style>
    <div style="float: left; width: 280px;">
 
        <div id="banner"  onclick="alert('1')">
            <zf:ListView ID="lvTBGZ" runat="server">
                <LayoutTemplate>
                    <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                    </zf:PlaceHolder>
                </LayoutTemplate>
                <ItemTemplate>
                    <a href="/news/index.aspx?id=<%#Eval("NewsId") %>"  target="_top"  title="<%#  string.Concat(Eval("Title")).Replace("\"","'") %>">
                        <img src="/photo/news/<%# string.Concat(Eval("Photo")).Replace(";","") %>" width="280" 
                            height="236" title="<%#  string.Concat(Eval("Title")).Replace("\"","'") %>"></a>
                            
                </ItemTemplate>
            </zf:ListView>
        </div>
        <div class="hot_title">
        </div>
        <div id="hot_title">
        </div>
        <div id="btn">
        </div>
    </div>

    <script type="text/javascript">
        $(function() {
            $('#banner').cycle({
                fx: 'scrollLeft',
                pager: '#btn',
                speed: 100,
                before: function onAfter() {
                $('#hot_title').html(String.format('<span><a href="{1}"   target="_top">{0}</a></span>', this.title,
                    this.href));
                }
            });

            $('#banner a').each(function() {
                $(this).click(function() {
                    alert(this.href);
                });
            });
        });
    </script>

    </form>
</body>
</html>
